From bbc10fbb403df648ea3f1cdb7729ff5188d955b4 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 18 Sep 2008 10:41:41 +0100 Subject: [PATCH] xm list: Return unique exit code for non-existent domain This patch will make xm return a exit code of 3 if `xm list ` is done rather than the generic code of 1. I used 3 because XendClient had a macro setup pointing ERROR_INVALID_DOMAIN to 3. From: "Shaun R." Signed-off-by: Keir Fraser --- tools/python/xen/xm/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index 596b943ef4..968828e1b3 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -2926,6 +2926,7 @@ def _run_cmd(cmd, cmd_name, args): except xmlrpclib.Fault, ex: if ex.faultCode == XendClient.ERROR_INVALID_DOMAIN: err("Domain '%s' does not exist." % ex.faultString) + return False, ex.faultCode else: err(ex.faultString) _usage(cmd_name) -- 2.30.2